package net.hn.hnms.biz.plan.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.hn.hnms.sys.common.core.enums.CoalInfo;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 回采工作面信息
 *
 * @author ly
 * @since 1.0.0 2022-08-16
 */
@Data
@ApiModel("回采工作面信息")
public class DimMiningFaceVO extends BaseVO {

    @ApiModelProperty(value = "id")
    private String miningFaceId;
    @ApiModelProperty(value = "煤矿编号")
    private String mineCode;

    @ApiModelProperty(value = "工作面名称")
    private String miningFaceName;
    @ApiModelProperty(value = "工作面编号")
    private String miningFaceCode;
    @ApiModelProperty(value = "工作面标高（m）")
    private BigDecimal miningFaceHigh;
    @ApiModelProperty(value = "可采走向长度（m）")
    private BigDecimal miningFaceLength;
    @ApiModelProperty(value = "煤层倾角")
    private BigDecimal miningFaceAngle;
    @ApiModelProperty(value = "平均煤厚（m）")
    private BigDecimal miningFaceThick;

    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "Asia/Shanghai"
    )
    @DateTimeFormat( pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "预计结束时间")
    private Date estimateEndDate;

    @ApiModelProperty(value = "搬家倒面至")
    private String relocation;

    @ApiModelProperty(value = "煤矿名称")
    private String mineName;


    @ApiModelProperty(value = "公司名称")
    private String companyName;

    @ApiModelProperty(value = "公司编码")
    private String companyCode;

    @ApiModelProperty(value = "总工作面个数")
    private String totalDimMining;

    @ApiModelProperty(value = "可采走向长度（m）")
    private BigDecimal totalMiningFaceLength;


    @ApiModelProperty(value = "平均煤厚（m）")
    private BigDecimal totalMiningFaceThick;

    @ApiModelProperty(value = "是否重点区域")
    private BigDecimal isKeyArea;

    public void setMineNames(String mineName) {

        this.mineName = CoalInfo.getMineNameByMineCode(mineName);
    }

    public void setCompanyNames(String companyCode) {

        this.companyName = CoalInfo.getCompanyNameByCompanyCode(companyCode);
    }
}
